Telegram Group & Telegram Channel
25. Floyd Triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

import java.util.Scanner;

class FloydTriangle
{
public static void main(String args[])
{
int n, num = 1, c, d;
Scanner in = new Scanner(System.in);

System.out.print("Enter the number of rows of floyd's triangle : ");
n = in.nextInt();

System.out.println("Floyd's triangle :-");

for (c = 1; c <= n; c++)
{
for (d = 1; d <= c; d++)
{
System.out.print(num + " ");
num++;
}

System.out.println();
}
}
}

@java_codings



tg-me.com/java_codings/37
Create:
Last Update:

25. Floyd Triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

import java.util.Scanner;

class FloydTriangle
{
public static void main(String args[])
{
int n, num = 1, c, d;
Scanner in = new Scanner(System.in);

System.out.print("Enter the number of rows of floyd's triangle : ");
n = in.nextInt();

System.out.println("Floyd's triangle :-");

for (c = 1; c <= n; c++)
{
for (d = 1; d <= c; d++)
{
System.out.print(num + " ");
num++;
}

System.out.println();
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/37

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. β€œThis is how new coins are created” and new transactions are added to the blockchain, says Okoro.

If riding a bucking bronco is your idea of fun, you’re going to love what the stock market has in store. Consider this past week’s ride a preview.The week’s action didn’t look like much, if you didn’t know better. The Dow Jones Industrial Average rose 213.12 points or 0.6%, while the S&P 500 advanced 0.5%, and the Nasdaq Composite ended little changed.

Advance Java ‍ from de


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA